#ifndef _MSGBUSIMPL_H_
#define _MSGBUSIMPL_H_

#include "stdafx.h"

class CMsgBusImpl : public IMsgBus, public IPlugin, public IPluginRun, public CUnknownImp
{
public:
    CMsgBusImpl(void);
    virtual ~CMsgBusImpl(void);

    BEGIN_STDCOM_MAP
    STDCOM_INTERFACE_ENTRY_UNKNOWN_(IMsgBus)
    STDCOM_INTERFACE_ENTRY(IPlugin)
    STDCOM_INTERFACE_ENTRY(IPluginRun)
    STDCOM_INTERFACE_ENTRY(IMsgBus)
    END_STDCOM_MAP

    // IPlugin
    std_method(Init)(IBase* pRot, IBase* pBase);
    std_method(Uninit)();

    // IPluginRun
    std_method(Start)(_pid_t pid, unsigned int type);
    std_method(Stop)(unsigned int exit);

    // IMsgBus
    std_method(CreateNode)(NODE_CLASS cls, IBase** pBase);

protected:
    _lComPtr<IRot> m_pRot;
    _lComPtr<IAsynFrame> m_pIAsynFrame;
};
#endif
